project(kernel-dll)

# 设置策略CMP0091为NEW，新策略 用于MT/MD等编译选项的配置
if(POLICY CMP0091)
    cmake_policy(SET CMP0091 NEW)
endif(POLICY CMP0091)

add_library(${PROJECT_NAME} SHARED
    src/kernel.cpp
    ${KRTS_PATH}/Kithara.cpp
)

target_link_libraries(${PROJECT_NAME}
    PRIVATE kernel-class
    PUBLIC ${KRTS_LIB_NAME}
)

target_include_directories(${PROJECT_NAME}
    PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
    PRIVATE ${CMAKE_SOURCE_DIR}/base/include
)
# Kithara 11.18 版本签名
KRTS_LIB_SIGN(${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}/${PROJECT_NAME}.dll ${PROJECT_NAME})
# 设置MT/MTd
set_property(TARGET ${PROJECT_NAME} PROPERTY
    MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")